package com.tinem.platform.module.starter.jpa.entity.pay;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className PayChannel
 * @description 支付渠道表
 * @site
 * @company
 * @create 2021-12-16
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_pay_channel")
@ApiModel("支付渠道表")
public class PayChannel implements Serializable,Cloneable{
    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "ID",required = true)
    private String id;

    @Column(name = "c_code",nullable=true)
    @ApiModelProperty(name = "code", value = "通道代码",required = true)
    private String code;

    @Column(name = "c_name",nullable=true)
    @ApiModelProperty(name = "name", value = "支付渠道名称",required = true)
    private String name;

    @Column(name = "c_logo",nullable=true)
    @ApiModelProperty(name = "logo", value = "支付渠道Logo",required = true)
    private String logo;

    @Column(name = "c_access_type",nullable=true)
    @ApiModelProperty(name = "accessType", value = "客户端接入方式",required = true)
    private Integer accessType;
    @Enumerated(EnumType.STRING)
    @Column(name = "c_currency_type",nullable=true)
    @ApiModelProperty(name = "currencyType", value = "货币类型",required = true)
    private com.tinem.platform.module.pojo.enums.common.CurrencyType currencyType;

    @Column(name = "c_account",nullable=true)
    @ApiModelProperty(name = "account", value = "接入账户",required = true)
    private String account;

    @Column(name = "c_rate",nullable=true)
    @ApiModelProperty(name = "rate", value = "汇率",required = true)
    private java.math.BigDecimal rate;

    @Column(name = "c_submit_url",nullable=true)
    @ApiModelProperty(name = "submitUrl", value = "支付提交地址",required = true)
    private String submitUrl;

    @Column(name = "c_channel_params",nullable=false)
    @ApiModelProperty(name = "channelParams", value = "支付渠道接入参数",required = false)
    private String channelParams;

    @Enumerated(EnumType.STRING)
    @Column(name = "c_enable",nullable=true)
    @ApiModelProperty(name = "enable", value = "是否启用此支付渠道",required = true)
    private com.tinem.platform.module.pojo.enums.common.Enabled enable;

    @Column(name = "c_sort",nullable=false)
    @ApiModelProperty(name = "sort", value = "排序（倒序排列，数字越大的在前面）",required = false)
    private Integer sort;

    @Version
    @Column(name = "c_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = false)
    private Integer revision;

    @Column(name = "c_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = false)
    private String createdBy;

    @Column(name = "c_created_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = false)
    private Date createdTime;

    @Column(name = "c_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = false)
    private String updatedBy;

    @Column(name = "c_updated_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = false)
    private Date updatedTime;

}